<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'project-profile-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'parent_project'); ?>
		<!--<?php  /*echo $form->textField($model,'parent_project',array('size'=>10,'maxlength'=>10)); */ ?>  -->
		<?php echo $form->dropDownList($model,'parent_project', CHtml::listData(ProjectProfile::model()->findAll(), 'id', 'name'), array('empty' => 'No Parent'));?>
		<!--<?php /*echo $form->dropDownList($model,'hierarchal_type',ProjectStatusLookup::items('HierarchalType')); */?> -->
		<?php echo $form->error($model,'parent_project'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name',array('size'=>40,'maxlength'=>40)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'hierarchal_type'); ?>
		<!--<?php /*echo $form->textField($model,'hierarchal_type');*/ ?>-->
		<?php echo $form->dropDownList($model,'hierarchal_type',ProjectStatusLookup::items('HierarchalType')); ?>
		<?php echo $form->error($model,'hierarchal_type'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'about'); ?>
		<?php echo $form->textArea($model,'about',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'about'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'requirement'); ?>
		<?php echo $form->textArea($model,'requirement',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'requirement'); ?>
	</div>

        <?php if (Yii::app()->user->id == '3'): ?>

	<div class="row">
		<?php echo $form->labelEx($model,'status'); ?>
		<!--<?php /*echo $form->textField($model,'status'); */?>-->
		<?php echo $form->dropDownList($model,'status',ProjectStatusLookup::items('ProjectStatus')); ?>
		<?php echo $form->error($model,'status'); ?>
	</div>
	
	<?php endif; ?>

	<div class="row">
		<?php echo $form->labelEx($model,'supervisor_id'); ?>
		<!--<?php echo $form->textField($model,'supervisor_id',array('size'=>10,'maxlength'=>10)); ?>-->
		<?php echo $form->dropDownList($model,'supervisor_id', CHtml::listData(User::model()->findAll(), 'id', 'username'));?>
		<?php echo $form->error($model,'supervisor_id'); ?>
	</div>

        <!--

	<div class="row">
		<?php echo $form->labelEx($model,'vote'); ?>
		<?php echo $form->textField($model,'vote',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'vote'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'rate'); ?>
		<?php echo $form->textField($model,'rate'); ?>
		<?php echo $form->error($model,'rate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'create_time'); ?>
		<?php echo $form->textField($model,'create_time'); ?>
		<?php echo $form->error($model,'create_time'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'last_update'); ?>
		<?php echo $form->textField($model,'last_update'); ?>
		<?php echo $form->error($model,'last_update'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'author_id'); ?>
		<?php echo $form->textField($model,'author_id',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'author_id'); ?>
	</div>
	
	-->

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->